package com.canaan.business.domain.basic;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.canaan.common.annotation.Excel;
import com.canaan.common.annotation.TableName;
import com.canaan.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 物料主数据对象 wms_product
 *
 * @author ruoyi
 * @date 2022-11-30
 */
@TableName("wms_product")
public class WmsProduct extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键ID */
    private Long id;

    /** 编号 */
    private String no;

    /** 物料编号 */
    @Excel(name = "物料编号")
    private String productNo;

    /** 物料名称 */
    @Excel(name = "物料名称")
    private String productName;

    /** 物料类型 */
    @Excel(name = "物料类型")
    private String productType;

    /** 物料版本 */
    private String productVersion;

    /** 重量 */
    @Excel(name = "重量")
    private BigDecimal weight;

    /** 主单位编号 */
    @Excel(name = "单位")
    private String company;

    /** 查询物料质检项 */
    private String searchQualityItem;

    /** 是否配置质检项 */
    private String isSetQualityItem;

    /** 是否需要出货检 */
    private String isOqc;

    /** 包装数量 */
    private Integer packageQty;

    /** 安全库存 */
    private BigDecimal safetyStock;

    /** 最低库存 */
    private BigDecimal minimumStock;

    /** 最高库存 */
    private BigDecimal highestStock;

    /** 抽检比例 */
    private BigDecimal qualityRatio;

    /** 包装尺寸 */
    @Excel(name = "包装尺寸")
    private String packageSize;

    /** 包装类型 1纸箱 2料箱 */
    @Excel(name = "包装类型 1纸箱 2料箱")
    private String packageType;

    /** 是否删除：1是 0否 */
    private String delFlag;

    /** 需要过滤掉的产品编号 */
    private List<String> notInProductNos;

    /** 需要筛选的产品编号 */
    private List<String> productNos;

    /** 创建人 */
    @Excel(name = "创建人", type = Excel.Type.EXPORT)
    private String createByName;

    /** 创建时间 */
    @Excel(name = "创建时间", type = Excel.Type.EXPORT, dateFormat = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    /** 更新人 */
    @Excel(name = "更新人", type = Excel.Type.EXPORT)
    private String updateByName;

    /** 更新时间 */
    @Excel(name = "最后更新时间", type = Excel.Type.EXPORT, dateFormat = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    public String getIsOqc() {
        return isOqc;
    }

    public void setIsOqc(String isOqc) {
        this.isOqc = isOqc;
    }

    public BigDecimal getQualityRatio() {
        return qualityRatio;
    }

    public void setQualityRatio(BigDecimal qualityRatio) {
        this.qualityRatio = qualityRatio;
    }

    public List<String> getNotInProductNos() {
        return notInProductNos;
    }

    public List<String> getProductNos() {
        return productNos;
    }

    public String getIsSetQualityItem() {
        return isSetQualityItem;
    }

    public void setIsSetQualityItem(String isSetQualityItem) {
        this.isSetQualityItem = isSetQualityItem;
    }

    public void setProductNos(List<String> productNos) {
        this.productNos = productNos;
    }

    public void setNotInProductNos(List<String> notInProductNos) {
        this.notInProductNos = notInProductNos;
    }

    public String getSearchQualityItem() {
        return searchQualityItem;
    }

    public void setSearchQualityItem(String searchQualityItem) {
        this.searchQualityItem = searchQualityItem;
    }

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }
    public void setNo(String no)
    {
        this.no = no;
    }

    public String getNo()
    {
        return no;
    }
    public void setProductNo(String productNo)
    {
        this.productNo = productNo;
    }

    @NotBlank(message = "物料编号不能为空")
    @Size(min = 0, max = 200, message = "物料编号长度不能超过200个字符")
    public String getProductNo()
    {
        return productNo;
    }
    public void setProductName(String productName)
    {
        this.productName = productName;
    }

    @NotBlank(message = "物料名称不能为空")
    @Size(min = 0, max = 200, message = "物料名称长度不能超过200个字符")
    public String getProductName()
    {
        return productName;
    }
    public void setProductType(String productType)
    {
        this.productType = productType;
    }

    public String getProductType()
    {
        return productType;
    }
    public void setProductVersion(String productVersion)
    {
        this.productVersion = productVersion;
    }

    public String getProductVersion()
    {
        return productVersion;
    }
    public void setWeight(BigDecimal weight)
    {
        this.weight = weight;
    }

    public BigDecimal getWeight()
    {
        return weight;
    }
    public void setCompany(String company)
    {
        this.company = company;
    }

    public String getCompany()
    {
        return company;
    }
    public void setPackageQty(Integer packageQty)
    {
        this.packageQty = packageQty;
    }

    public Integer getPackageQty()
    {
        return packageQty;
    }
    public void setSafetyStock(BigDecimal safetyStock)
    {
        this.safetyStock = safetyStock;
    }

    public BigDecimal getSafetyStock()
    {
        return safetyStock;
    }
    public void setMinimumStock(BigDecimal minimumStock)
    {
        this.minimumStock = minimumStock;
    }

    public BigDecimal getMinimumStock()
    {
        return minimumStock;
    }
    public void setHighestStock(BigDecimal highestStock)
    {
        this.highestStock = highestStock;
    }

    public BigDecimal getHighestStock()
    {
        return highestStock;
    }
    public void setDelFlag(String delFlag)
    {
        this.delFlag = delFlag;
    }

    public String getDelFlag()
    {
        return delFlag;
    }

    public String getPackageSize() {
        return packageSize;
    }

    public void setPackageSize(String packageSize) {
        this.packageSize = packageSize;
    }

    public String getPackageType() {
        return packageType;
    }

    public void setPackageType(String packageType) {
        this.packageType = packageType;
    }
    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("no", getNo())
            .append("productNo", getProductNo())
            .append("productName", getProductName())
            .append("productType", getProductType())
            .append("productVersion", getProductVersion())
            .append("weight", getWeight())
            .append("company", getCompany())
            .append("packageQty", getPackageQty())
            .append("safetyStock", getSafetyStock())
            .append("minimumStock", getMinimumStock())
            .append("highestStock", getHighestStock())
            .append("delFlag", getDelFlag())
            .append("createBy", getCreateBy())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("createTime", getCreateTime())
            .toString();
    }

    private List<Long> ids;

    public List<Long> getIds() {
        return ids;
    }

    public void setIds(List<Long> ids) {
        this.ids = ids;
    }

    public String getCreateByName() {
        return createByName;
    }

    public void setCreateByName(String createByName) {
        this.createByName = createByName;
    }

    @Override
    public Date getCreateTime() {
        return createTime;
    }

    @Override
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public String getUpdateByName() {
        return updateByName;
    }

    public void setUpdateByName(String updateByName) {
        this.updateByName = updateByName;
    }

    @Override
    public Date getUpdateTime() {
        return updateTime;
    }

    @Override
    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }
}
